package com.example.activity.service;

import com.example.activity.vo.upload.FileUpDowmInfoVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;

public interface FileUpLoadService {
    /**
     * 文件上传
     *
     * @param fileList MultipartFile
     */
    List<FileUpDowmInfoVO> uploadFile(List<MultipartFile> fileList) throws Exception;

    /**
     * 获取文件流
     *
     * @param filePath 文件路径
     * @return InputStream
     */
    InputStream downloadFileStream(String filePath);

    /**
     * 下载流
     * @param fileName 文件名
     * @param downloadType 下载类型
     * @param inputStream 输入流
     * @param response 响应流
     */
    void downStream(String fileName, String downloadType, InputStream inputStream, HttpServletResponse response) throws IOException;
}
